package org.truenewx.tnxjee.core.config;

import org.truenewx.tnxjee.core.crypto.AesStringEncryptor;
import org.truenewx.tnxjee.core.crypto.KeyBidirectionalEncryptor;

public class AesEncryptPropertyValueTranslator extends EncryptPropertyValueTranslator {

    @Override
    protected KeyBidirectionalEncryptor newEncryptor() {
        String password = this.properties.getPassword();
        if (password == null) {
            password = getPrefix();
        }
        return new AesStringEncryptor(password);
    }

}
